#{extends 'layout.html' /}
#{set title:messages.get('crud.blank.title', type.modelName) /}

#{script 'jquery-ui-1.8.21.custom.min.js'/}
#{script 'jquery.ui.datepicker.js'/}
#{script 'jquery.ui.datepicker-es.js'/}
#{script 'datepicker.js'/}

<div id="crudBlank" class="${type.name}">
	
	<h2 id="crudBlankTitle">${title}</h2>
	
	<div class="objectForm">
		
		#{form action:@create(), enctype:'multipart/form-data', id:'promoForm'}
			
			#{field 'object.nombre'}
				<div class="crudField crud_text">
					<label for="${field.id}">
						&{'promo.nombre'}
					</label>
					<input id="${field.id}" class="${field.errorClass}" type="text" name="${field.name}" value="${object.nombre}" size="50" maxlength="50" />
					#{ifError field.name}
						<span class="error">&{'crud.help.required'}</span>
					#{/ifError}
				    <span class="crudHelp">
						&{'crud.help.required'}
					</span>
				</div>
			#{/field}
			
			#{field 'object.descripcion'}
				<div class="crudField crud_text">
					<label for="${field.id}">
						&{'promo.descripcion'}
					</label>
					<textarea id="${field.id}" class="${field.errorClass}" name="${field.name}" maxlength="5000" rows="10" cols="50">${object.descripcion}</textarea>
					#{ifError field.name}
						<span class="error">&{'crud.help.required'}</span>
					#{/ifError}
				    <span class="crudHelp">
						&{'crud.help.required'}
					</span>
				</div>
			#{/field}
			
			<p class="crudButtons">
				<a href="@{Promos.list}">&{'cancelar'}</a>
				<input type="submit" class="btn" name="_save" value="&{'crud.save', type.modelName}" />
			</p>
			
		#{/form}
	</div>
</div>
